// import LayoutCon from '@/pages/Layout';
import { Navigate } from 'react-router-dom';

const { getToken } = require("@/utils");


function AuthRoute({children}) {
    const isToken = getToken();
    console.log('是否有token----_______>',isToken)
    if(isToken){
        return <>{children}</>
    } else {
        return <Navigate to="/login" replace />
    }
}

export {AuthRoute};